﻿Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.Design.WebControls
Imports System.Text
Imports System.IO
Imports System.Drawing
Imports System.Web
Imports System.Runtime.Serialization
Imports System.Data.SqlClient
Imports System.ComponentModel.Design
Imports System.Drawing.Design



Public Class Referencia
  Inherits ScriptControl

  Dim IdProveedorValor As String = String.Empty
  Public Property IdProveedor() As String
    Get
      Return IdProveedorValor
    End Get
    Set(ByVal value As String)
      IdProveedorValor = value
    End Set
  End Property

  Dim IdProveedorReferenciaValor As String = String.Empty
  Public Property IdProveedorReferencia() As String
    Get
      Return IdProveedorReferenciaValor
    End Get
    Set(ByVal value As String)
      IdProveedorReferenciaValor = value
    End Set
  End Property

  Dim ColumnaClaveValor As String = String.Empty
  Public Property ColumnaClave() As String
    Get
      Return ColumnaClaveValor
    End Get
    Set(ByVal value As String)
      ColumnaClaveValor = value
    End Set
  End Property

  Dim ColumnaDescripcionValor As String = String.Empty
  Public Property ColumnaDescripcion() As String
    Get
      Return ColumnaDescripcionValor
    End Get
    Set(ByVal value As String)
      ColumnaDescripcionValor = value
    End Set
  End Property

  

  Protected Overrides Function GetScriptDescriptors() As IEnumerable(Of ScriptDescriptor)
    Dim descriptor As New ScriptControlDescriptor("MoniMisi2.Referencia", Me.ClientID)
    Dim descriptors As New List(Of ScriptDescriptor)
    descriptor.AddProperty("IdProveedor", CType(Funciones.EncontrarControl(Me.IdProveedor, Me), System.Web.UI.Control).ClientID)
    descriptor.AddProperty("IdProveedorReferencia", CType(Funciones.EncontrarControl(Me.IdProveedorReferencia, Me), System.Web.UI.Control).ClientID)
    descriptor.AddProperty("ColumnaClave", Me.ColumnaClave)
    descriptor.AddProperty("ColumnaDescripcion", Me.ColumnaDescripcion)
    descriptors.Add(descriptor)
    Return descriptors
  End Function

  Protected Overrides Function GetScriptReferences() As IEnumerable(Of ScriptReference)
    Dim scriptRef As New ScriptReference("MoniMisi2.Referencia.js", Funciones.NombreCompletoEnsamblado(Me.GetType, "MoniMisi2.Referencia"))
    scriptRef.NotifyScriptLoaded = False
    Dim scriptRefs As New List(Of ScriptReference)
    scriptRefs.Add(scriptRef)
    Return scriptRefs
  End Function


End Class

